﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebControlTest.aspx.cs" Inherits="WebControls.WebControlTest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script language="c#" runat="server">
        public void ButtonClick(Object sender, EventArgs e)
        {
            int a = int.Parse(TextLeftRange.Value);
            int b = int.Parse(TextRightRange.Value);
            
            Random r = new Random();
            double d = r.Next(a, b);

            TextRightRange.Value = d+" ";
                 
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <input id="TextLeftRange" type="text"  runat="server"/>
        <input id="TextRightRange" type="text" runat="server"/>
    </div>

    <div>
        <br>
        <input type="button" id="ButtonRandomGenerator" runat="server"  value="Generate" 
            name="Generator"  onserverclick=" ButtonClick" />
        </br>
    </div>
    </form>
</body>
</html>
